<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

<title>个人资料</title>

<link href="../../js/AmazeUI-2.4.2/assets/css/admin.css"
	rel="stylesheet" type="text/css">
<link href="../../js/AmazeUI-2.4.2/assets/css/amazeui.css"
	rel="stylesheet" type="text/css">
<link href="../../css/personal.css" rel="stylesheet" type="text/css">
<link href="../../css/infstyle.css" rel="stylesheet" type="text/css">
<script src="../../js/AmazeUI-2.4.2/assets/js/jquery.min.js"
	type="text/javascript"></script>
<script src="../../js/AmazeUI-2.4.2/assets/js/amazeui.js"
	type="text/javascript"></script>
<script src="../../js/layui/layui.js" charset="utf-8"></script>

</head>

<body>
	<!--头 -->
	<header>
		<article>
			<div class="mt-logo">
				<!--顶部导航条 -->
				<div class="am-container header">
					<ul class="message-l">
						<div class="topMessage">
							<div class="menu-hd">
								<a href="../home/login.html" target="_top" class="h">${data.name}</a> <a
									href="../home/register.html" target="_top">免费注册</a>
							</div>
						</div>
					</ul>
					<ul class="message-r">
						<div class="topMessage home">
							<div class="menu-hd">
								<a href="#" target="_top" class="h">商城首页</a>
							</div>
						</div>
						<div class="topMessage my-shangcheng">
							<div class="menu-hd MyShangcheng">
								<a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a>
							</div>
						</div>
						<div class="topMessage mini-cart">
							<div class="menu-hd">
								<a id="mc-menu-hd" href="#" target="_top"><i
									class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong
									id="J_MiniCartNum" class="h">0</strong></a>
							</div>
						</div>
						<div class="topMessage favorite">
							<div class="menu-hd">
								<a href="#" target="_top"><i
									class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a>
							</div>
					</ul>
				</div>

				<!--悬浮搜索框-->

				<div class="nav white">
					<div class="logoBig">
						<li><img src="../../images/logobig.png" /></li>
					</div>

					<div class="search-bar pr">
						<a name="index_none_header_sysc" href="#"></a>
						<form>
							<input id="searchInput" name="index_none_header_sysc" type="text"
								placeholder="搜索" autocomplete="off"> <input
								id="ai-topsearch" class="submit am-btn" value="搜索" index="1"
								type="submit">
						</form>
					</div>
				</div>

				<div class="clear"></div>
			</div>
			</div>
		</article>
	</header>
	<div class="nav-table">
		<div class="long-title">
			<span class="all-goods">全部分类</span>
		</div>
		<div class="nav-cont">
			<ul>
				<li class="index"><a href="#">首页</a></li>
				<li class="qc"><a href="#">闪购</a></li>
				<li class="qc"><a href="#">限时抢</a></li>
				<li class="qc"><a href="#">团购</a></li>
				<li class="qc last"><a href="#">大包装</a></li>
			</ul>
			<div class="nav-extra">
				<i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利 <i
					class="am-icon-angle-right" style="padding-left: 10px;"></i>
			</div>
		</div>
	</div>
	<b class="line"></b>
	<div class="center">
		<div class="col-main">
			<div class="main-wrap">

				<div class="user-info">
					<!--标题 -->
					<div class="am-cf am-padding">
						<div class="am-fl am-cf">
							<strong class="am-text-danger am-text-lg">个人资料</strong> / <small>Personal&nbsp;information</small>
						</div>
					</div>
					<hr />

					<!--头像 -->
					<div class="user-infoPic">

						<div class="filePic">
							<input type="file" class="inputPic"
								allowexts="gif,jpeg,jpg,png,bmp" accept="image/*"> <img
								class="am-circle am-img-thumbnail"
								src="../../images/getAvatar.do.jpg" alt="" />
						</div>

						<p class="am-form-help">头像</p>

						<div class="info-m">
							<div>
								<b>用户名：<i>小叮当</i></b>
							</div>
							<div class="u-level">
								<span class="rank r2"> <s class="vip1"></s><a
									class="classes" href="#">铜牌会员</a>
								</span>
							</div>
							<div class="u-safety">
								<a href="safety.html"> 账户安全 <span class="u-profile"><i
										class="bc_ee0000" style="width: 60px;" width="0">60分</i></span>
								</a>
							</div>
						</div>
					</div>

					<!--个人信息 -->
					<div class="info-main">
						<form class="am-form am-form-horizontal">
						<input type="hidden" id="id">
						<!--隐藏域获取注册用户的id-->
							<div class="am-form-group">
								<label for="user-name2" class="am-form-label">昵称</label>
								<div class="am-form-content">
									<input type="text" id="nickname" name="nickname" value="" placeholder="nickname">
								</div>
							</div>

							<div class="am-form-group">
								<label for="user-name" class="am-form-label">姓名</label>
								<div class="am-form-content">
									<input type="text" id="name" name="name" value="" placeholder="name">
								</div>
							</div>

							<div class="am-form-group">
								<label class="am-form-label">性别</label>
								<div class="am-form-content sex">
									<label class="am-radio-inline"> <input type="radio"
										id="sex" name="radio10" value="1" data-am-ucheck>男 
									</label> <label class="am-radio-inline"> <input type="radio"
										id="sex" name="radio10" value="2" data-am-ucheck>女 
									</label> 
								</div>
							</div>

							<div class="am-form-group">
								<label for="user-birth" class="am-form-label">生日</label>
								<div class="am-form-content">
									<input class="birth-select" placeholder="年月日" id="birthday"
										name="birthday" value=""
										onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD'})">
								</div>
							</div>
							<div class="am-form-group">
								<label for="user-phone" class="am-form-label">电话</label>
								<div class="am-form-content">
									<input id="phone" name="phone" value="" placeholder="telephonenumber" type="tel">
								</div>
							</div>
							<div class="am-form-group">
								<label for="user-email" class="am-form-label">电子邮件</label>
								<div class="am-form-content">
									<input id="email" name="email" value="${data.email}" placeholder="Email" type="email">
								</div>
							</div>
							<div class="info-btn">
								<input type="submit" id="savebut" name="save-edit" value="保存"
						        class="am-btn am-btn-danger">
							</div>

						</form>
					</div>

				</div>

			</div>
			<!--底部-->
			<div class="footer">
				<div class="footer-hd">
					<p>
						<a href="#">恒望科技</a> <b>|</b> <a href="#">商城首页</a> <b>|</b> <a
							href="#">支付宝</a> <b>|</b> <a href="#">物流</a>
					</p>
				</div>
				<div class="footer-bd">
					<p>
						<a href="#">关于恒望</a> <a href="#">合作伙伴</a> <a href="#">联系我们</a> <a
							href="#">网站地图</a> <em>© 2015-2025 Hengwang.com 版权所有</em>
					</p>
				</div>
			</div>
		</div>

		<aside class="menu">
			<ul>
				<li class="person"><a href="/html/person/safety.html">个人中心</a></li>
				<li class="person"><a href="#">个人资料</a>
					<ul>
						<li class="active"><a href="/html/person/showInformation.html">个人信息</a></li>
						<li><a href="/html/person/safety.html">安全设置</a></li>
						<li><a href="/html/person/safety.html">收货地址</a></li>
					</ul></li>
				<li class="person"><a href="#">我的交易</a>
					<ul>
						<li><a href="/html/person/safety.html">订单管理</a></li>
						<li><a href="/html/person/safety.html">退款售后</a></li>
					</ul></li>
				<li class="person"><a href="#">我的资产</a>
					<ul>
						<li><a href="/html/person/safety.html">优惠券 </a></li>
						<!--<li> <a href="bonus.html">红包</a></li>-->
						<li><a href="/html/person/safety.html">账单明细</a></li>
					</ul></li>

				<li class="person"><a href="#">我的小窝</a>
					<ul>
						<li><a href="/html/person/safety.html">收藏</a></li>
						<li><a href="/html/person/safety.html">足迹</a></li>
						<li><a href="/html/person/safety.html">评价</a></li>
						<li><a href="/html/person/safety.html">消息</a></li>
					</ul></li>

			</ul>

		</aside>
	</div>

</body>
<script>
		layui.use('laydate', function() {
			var laydate = layui.laydate;
		});
		var editUser = function() {
			$.ajax({
				type : "POST",
				dataType : "json",
				url : "/user/edit",
				//用的是异步提交页面
				data : {
					//页面传值
					"id":${data.id},
					"nickname" : $("#nickname").val(),
					"name" : $("#name").val(),
					"sex" : $("#sex").val(),
					"birthday" : $("#birthday").val(),
					"phone" : $("#phone").val(),
					"email" : $("#email").val()
				},
			    success : function(msg) {
					alert(msg);
					//location.href = "/user/show";
					
				 //$('#savebut').click(); 
		
			   }
			});
		}
		$('#savebut').on('click', function() {
			alert();
			editUser();
			//当点击保存按钮时,调用编辑函数
		});
</script>

</html>